<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pyprocessing.lights'</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pyprocessing-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="pyprocessing-module.html">Package&nbsp;pyprocessing</a> ::
        Module&nbsp;lights'
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="pyprocessing.lights%27-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="pyprocessing.lights%27-module.html">Module pyprocessing.lights'</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-comment">#************************</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment"># Lights</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-comment"></tt><tt class="py-comment">#************************</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-comment"></tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">ctypes</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">pyglet</tt><tt class="py-op">.</tt><tt class="py-name">gl</tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Module pyprocessing.globs=pyprocessing.globs-module.html"><a title="pyprocessing.globs" class="py-name" href="#" onclick="return doclink('link-0', 'globs', 'link-0');">globs</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-1" class="py-name" targets="Module pyprocessing.constants=pyprocessing.constants-module.html"><a title="pyprocessing.constants" class="py-name" href="#" onclick="return doclink('link-1', 'constants', 'link-1');">constants</a></tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Module pyprocessing.colors=pyprocessing.colors-module.html"><a title="pyprocessing.colors" class="py-name" href="#" onclick="return doclink('link-2', 'colors', 'link-2');">colors</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Function pyprocessing.colors._getColor()=pyprocessing.colors-module.html#_getColor"><a title="pyprocessing.colors._getColor" class="py-name" href="#" onclick="return doclink('link-3', '_getColor', 'link-3');">_getColor</a></tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-name">__all__</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-string">'directionalLight'</tt><tt class="py-op">,</tt> <tt class="py-string">'pointLight'</tt><tt class="py-op">,</tt> <tt class="py-string">'ambientLight'</tt><tt class="py-op">,</tt> <tt class="py-string">'spotLight'</tt><tt class="py-op">,</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line">         <tt class="py-string">'lightFalloff'</tt><tt class="py-op">,</tt> <tt class="py-string">'lightSpecular'</tt><tt class="py-op">,</tt> <tt class="py-string">'lights'</tt><tt class="py-op">,</tt> <tt class="py-string">'noLights'</tt><tt class="py-op">]</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"> </tt>
<a name="_lightsOn"></a><div id="_lightsOn-def"><a name="L14"></a><tt class="py-lineno"> 14</tt> <a class="py-toggle" href="#" id="_lightsOn-toggle" onclick="return toggle('_lightsOn');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.lights'-module.html#_lightsOn">_lightsOn</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="_lightsOn-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="_lightsOn-expanded"><a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line">    <tt class="py-docstring">"""Turns on the lighting if not set earlier."""</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt id="link-4" class="py-name" targets="Class pyprocessing.globs.attrib=pyprocessing.globs.attrib-class.html"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-4', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-5" class="py-name" targets="Variable pyprocessing.globs.attrib.lights=pyprocessing.globs.attrib-class.html#lights,Function pyprocessing.lights'.lights()=pyprocessing.lights%27-module.html#lights"><a title="pyprocessing.globs.attrib.lights
pyprocessing.lights'.lights" class="py-name" href="#" onclick="return doclink('link-5', 'lights', 'link-5');">lights</a></tt><tt class="py-op">:</tt> <tt class="py-keyword">return</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line">    <tt id="link-6" class="py-name" targets="Variable pyprocessing.lights'.glEnable=pyprocessing.lights%27-module.html#glEnable"><a title="pyprocessing.lights'.glEnable" class="py-name" href="#" onclick="return doclink('link-6', 'glEnable', 'link-6');">glEnable</a></tt><tt class="py-op">(</tt><tt id="link-7" class="py-name" targets="Variable pyprocessing.lights'.GL_LIGHTING=pyprocessing.lights%27-module.html#GL_LIGHTING"><a title="pyprocessing.lights'.GL_LIGHTING" class="py-name" href="#" onclick="return doclink('link-7', 'GL_LIGHTING', 'link-7');">GL_LIGHTING</a></tt><tt class="py-op">)</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">    <tt id="link-8" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-8', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-9" class="py-name"><a title="pyprocessing.globs.attrib.lights
pyprocessing.lights'.lights" class="py-name" href="#" onclick="return doclink('link-9', 'lights', 'link-5');">lights</a></tt> <tt class="py-op">=</tt> <tt class="py-name">True</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt id="link-10" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-10', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-11" class="py-name" targets="Variable pyprocessing.globs.attrib.lightCount=pyprocessing.globs.attrib-class.html#lightCount"><a title="pyprocessing.globs.attrib.lightCount" class="py-name" href="#" onclick="return doclink('link-11', 'lightCount', 'link-11');">lightCount</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt id="link-12" class="py-name" targets="Variable pyprocessing.lights'.glDisable=pyprocessing.lights%27-module.html#glDisable"><a title="pyprocessing.lights'.glDisable" class="py-name" href="#" onclick="return doclink('link-12', 'glDisable', 'link-12');">glDisable</a></tt> <tt class="py-op">(</tt><tt id="link-13" class="py-name" targets="Variable pyprocessing.lights'.GL_LIGHT0=pyprocessing.lights%27-module.html#GL_LIGHT0"><a title="pyprocessing.lights'.GL_LIGHT0" class="py-name" href="#" onclick="return doclink('link-13', 'GL_LIGHT0', 'link-13');">GL_LIGHT0</a></tt><tt class="py-op">+</tt><tt class="py-name">i</tt><tt class="py-op">)</tt> </tt>
<a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line">    <tt id="link-14" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-14', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="pyprocessing.globs.attrib.lightCount" class="py-name" href="#" onclick="return doclink('link-15', 'lightCount', 'link-11');">lightCount</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
</div><a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line"> </tt>
<a name="directionalLight"></a><div id="directionalLight-def"><a name="L22"></a><tt class="py-lineno"> 22</tt> <a class="py-toggle" href="#" id="directionalLight-toggle" onclick="return toggle('directionalLight');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.lights'-module.html#directionalLight">directionalLight</a><tt class="py-op">(</tt><tt class="py-param">v1</tt><tt class="py-op">,</tt><tt class="py-param">v2</tt><tt class="py-op">,</tt><tt class="py-param">v3</tt><tt class="py-op">,</tt><tt class="py-param">nx</tt><tt class="py-op">,</tt><tt class="py-param">ny</tt><tt class="py-op">,</tt><tt class="py-param">nz</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="directionalLight-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="directionalLight-expanded"><a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">    <tt class="py-docstring">"""Adds a directional light (diffuse/specular) with the given color and direction."""</tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">    <tt id="link-16" class="py-name" targets="Function pyprocessing.lights'._lightsOn()=pyprocessing.lights%27-module.html#_lightsOn"><a title="pyprocessing.lights'._lightsOn" class="py-name" href="#" onclick="return doclink('link-16', '_lightsOn', 'link-16');">_lightsOn</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">    <tt id="link-17" class="py-name" targets="Function pyprocessing.colors.color()=pyprocessing.colors-module.html#color"><a title="pyprocessing.colors.color" class="py-name" href="#" onclick="return doclink('link-17', 'color', 'link-17');">color</a></tt> <tt class="py-op">=</tt> <tt id="link-18" class="py-name"><a title="pyprocessing.colors._getColor" class="py-name" href="#" onclick="return doclink('link-18', '_getColor', 'link-3');">_getColor</a></tt><tt class="py-op">(</tt><tt class="py-name">v1</tt><tt class="py-op">,</tt><tt class="py-name">v2</tt><tt class="py-op">,</tt><tt class="py-name">v3</tt><tt class="py-op">)</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">    <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt id="link-19" class="py-name"><a title="pyprocessing.lights'.GL_LIGHT0" class="py-name" href="#" onclick="return doclink('link-19', 'GL_LIGHT0', 'link-13');">GL_LIGHT0</a></tt> <tt class="py-op">+</tt> <tt id="link-20" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-20', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="pyprocessing.globs.attrib.lightCount" class="py-name" href="#" onclick="return doclink('link-21', 'lightCount', 'link-11');">lightCount</a></tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">    <tt id="link-22" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-22', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="pyprocessing.globs.attrib.lightCount" class="py-name" href="#" onclick="return doclink('link-23', 'lightCount', 'link-11');">lightCount</a></tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">    <tt id="link-24" class="py-name" targets="Variable pyprocessing.lights'.glLightfv=pyprocessing.lights%27-module.html#glLightfv"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-24', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-25" class="py-name" targets="Variable pyprocessing.lights'.GL_DIFFUSE=pyprocessing.lights%27-module.html#GL_DIFFUSE"><a title="pyprocessing.lights'.GL_DIFFUSE" class="py-name" href="#" onclick="return doclink('link-25', 'GL_DIFFUSE', 'link-25');">GL_DIFFUSE</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt id="link-26" class="py-name"><a title="pyprocessing.colors.color" class="py-name" href="#" onclick="return doclink('link-26', 'color', 'link-17');">color</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">    <tt id="link-27" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-27', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-28" class="py-name" targets="Variable pyprocessing.lights'.GL_AMBIENT=pyprocessing.lights%27-module.html#GL_AMBIENT"><a title="pyprocessing.lights'.GL_AMBIENT" class="py-name" href="#" onclick="return doclink('link-28', 'GL_AMBIENT', 'link-28');">GL_AMBIENT</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">    <tt id="link-29" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-29', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-30" class="py-name" targets="Variable pyprocessing.lights'.GL_SPECULAR=pyprocessing.lights%27-module.html#GL_SPECULAR"><a title="pyprocessing.lights'.GL_SPECULAR" class="py-name" href="#" onclick="return doclink('link-30', 'GL_SPECULAR', 'link-30');">GL_SPECULAR</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt id="link-31" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-31', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Variable pyprocessing.globs.attrib.lightSpecular=pyprocessing.globs.attrib-class.html#lightSpecular,Function pyprocessing.lights'.lightSpecular()=pyprocessing.lights%27-module.html#lightSpecular"><a title="pyprocessing.globs.attrib.lightSpecular
pyprocessing.lights'.lightSpecular" class="py-name" href="#" onclick="return doclink('link-32', 'lightSpecular', 'link-32');">lightSpecular</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">    <tt id="link-33" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-33', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-34" class="py-name" targets="Variable pyprocessing.lights'.GL_POSITION=pyprocessing.lights%27-module.html#GL_POSITION"><a title="pyprocessing.lights'.GL_POSITION" class="py-name" href="#" onclick="return doclink('link-34', 'GL_POSITION', 'link-34');">GL_POSITION</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-op">-</tt><tt class="py-name">nx</tt><tt class="py-op">,</tt><tt class="py-op">-</tt><tt class="py-name">ny</tt><tt class="py-op">,</tt><tt class="py-op">-</tt><tt class="py-name">nz</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">    <tt id="link-35" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-35', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-36" class="py-name" targets="Variable pyprocessing.lights'.GL_SPOT_DIRECTION=pyprocessing.lights%27-module.html#GL_SPOT_DIRECTION"><a title="pyprocessing.lights'.GL_SPOT_DIRECTION" class="py-name" href="#" onclick="return doclink('link-36', 'GL_SPOT_DIRECTION', 'link-36');">GL_SPOT_DIRECTION</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">    <tt id="link-37" class="py-name" targets="Variable pyprocessing.lights'.glLightf=pyprocessing.lights%27-module.html#glLightf"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-37', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-38" class="py-name" targets="Variable pyprocessing.lights'.GL_SPOT_EXPONENT=pyprocessing.lights%27-module.html#GL_SPOT_EXPONENT"><a title="pyprocessing.lights'.GL_SPOT_EXPONENT" class="py-name" href="#" onclick="return doclink('link-38', 'GL_SPOT_EXPONENT', 'link-38');">GL_SPOT_EXPONENT</a></tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">    <tt id="link-39" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-39', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-40" class="py-name" targets="Variable pyprocessing.lights'.GL_SPOT_CUTOFF=pyprocessing.lights%27-module.html#GL_SPOT_CUTOFF"><a title="pyprocessing.lights'.GL_SPOT_CUTOFF" class="py-name" href="#" onclick="return doclink('link-40', 'GL_SPOT_CUTOFF', 'link-40');">GL_SPOT_CUTOFF</a></tt><tt class="py-op">,</tt> <tt class="py-number">180</tt><tt class="py-op">)</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">    <tt class="py-name">constant</tt><tt class="py-op">,</tt> <tt class="py-name">linear</tt><tt class="py-op">,</tt> <tt class="py-name">quadratic</tt> <tt class="py-op">=</tt> <tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">    <tt id="link-41" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-41', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-42" class="py-name" targets="Variable pyprocessing.lights'.GL_LINEAR_ATTENUATION=pyprocessing.lights%27-module.html#GL_LINEAR_ATTENUATION"><a title="pyprocessing.lights'.GL_LINEAR_ATTENUATION" class="py-name" href="#" onclick="return doclink('link-42', 'GL_LINEAR_ATTENUATION', 'link-42');">GL_LINEAR_ATTENUATION</a></tt><tt class="py-op">,</tt> <tt class="py-name">linear</tt><tt class="py-op">)</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">    <tt id="link-43" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-43', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-44" class="py-name" targets="Variable pyprocessing.lights'.GL_QUADRATIC_ATTENUATION=pyprocessing.lights%27-module.html#GL_QUADRATIC_ATTENUATION"><a title="pyprocessing.lights'.GL_QUADRATIC_ATTENUATION" class="py-name" href="#" onclick="return doclink('link-44', 'GL_QUADRATIC_ATTENUATION', 'link-44');">GL_QUADRATIC_ATTENUATION</a></tt><tt class="py-op">,</tt> <tt class="py-name">quadratic</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">    <tt id="link-45" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-45', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-46" class="py-name" targets="Variable pyprocessing.lights'.GL_CONSTANT_ATTENUATION=pyprocessing.lights%27-module.html#GL_CONSTANT_ATTENUATION"><a title="pyprocessing.lights'.GL_CONSTANT_ATTENUATION" class="py-name" href="#" onclick="return doclink('link-46', 'GL_CONSTANT_ATTENUATION', 'link-46');">GL_CONSTANT_ATTENUATION</a></tt><tt class="py-op">,</tt> <tt class="py-name">constant</tt><tt class="py-op">)</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">    <tt id="link-47" class="py-name"><a title="pyprocessing.lights'.glEnable" class="py-name" href="#" onclick="return doclink('link-47', 'glEnable', 'link-6');">glEnable</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">)</tt> </tt>
</div><a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"> </tt>
<a name="pointLight"></a><div id="pointLight-def"><a name="L41"></a><tt class="py-lineno"> 41</tt> <a class="py-toggle" href="#" id="pointLight-toggle" onclick="return toggle('pointLight');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.lights'-module.html#pointLight">pointLight</a><tt class="py-op">(</tt><tt class="py-param">v1</tt><tt class="py-op">,</tt><tt class="py-param">v2</tt><tt class="py-op">,</tt><tt class="py-param">v3</tt><tt class="py-op">,</tt><tt class="py-param">x</tt><tt class="py-op">,</tt><tt class="py-param">y</tt><tt class="py-op">,</tt><tt class="py-param">z</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="pointLight-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="pointLight-expanded"><a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">    <tt class="py-docstring">"""Adds a point light (diffuse/specular) with the given color and position."""</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">    <tt id="link-48" class="py-name"><a title="pyprocessing.lights'._lightsOn" class="py-name" href="#" onclick="return doclink('link-48', '_lightsOn', 'link-16');">_lightsOn</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">    <tt id="link-49" class="py-name"><a title="pyprocessing.colors.color" class="py-name" href="#" onclick="return doclink('link-49', 'color', 'link-17');">color</a></tt> <tt class="py-op">=</tt> <tt id="link-50" class="py-name"><a title="pyprocessing.colors._getColor" class="py-name" href="#" onclick="return doclink('link-50', '_getColor', 'link-3');">_getColor</a></tt><tt class="py-op">(</tt><tt class="py-name">v1</tt><tt class="py-op">,</tt><tt class="py-name">v2</tt><tt class="py-op">,</tt><tt class="py-name">v3</tt><tt class="py-op">)</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">    <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt id="link-51" class="py-name"><a title="pyprocessing.lights'.GL_LIGHT0" class="py-name" href="#" onclick="return doclink('link-51', 'GL_LIGHT0', 'link-13');">GL_LIGHT0</a></tt> <tt class="py-op">+</tt> <tt id="link-52" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-52', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="pyprocessing.globs.attrib.lightCount" class="py-name" href="#" onclick="return doclink('link-53', 'lightCount', 'link-11');">lightCount</a></tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">    <tt id="link-54" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-54', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="pyprocessing.globs.attrib.lightCount" class="py-name" href="#" onclick="return doclink('link-55', 'lightCount', 'link-11');">lightCount</a></tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">    <tt id="link-56" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-56', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-57" class="py-name"><a title="pyprocessing.lights'.GL_DIFFUSE" class="py-name" href="#" onclick="return doclink('link-57', 'GL_DIFFUSE', 'link-25');">GL_DIFFUSE</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt id="link-58" class="py-name"><a title="pyprocessing.colors.color" class="py-name" href="#" onclick="return doclink('link-58', 'color', 'link-17');">color</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">    <tt id="link-59" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-59', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-60" class="py-name"><a title="pyprocessing.lights'.GL_AMBIENT" class="py-name" href="#" onclick="return doclink('link-60', 'GL_AMBIENT', 'link-28');">GL_AMBIENT</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">    <tt id="link-61" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-61', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-62" class="py-name"><a title="pyprocessing.lights'.GL_SPECULAR" class="py-name" href="#" onclick="return doclink('link-62', 'GL_SPECULAR', 'link-30');">GL_SPECULAR</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt id="link-63" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-63', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-64" class="py-name"><a title="pyprocessing.globs.attrib.lightSpecular
pyprocessing.lights'.lightSpecular" class="py-name" href="#" onclick="return doclink('link-64', 'lightSpecular', 'link-32');">lightSpecular</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">    <tt id="link-65" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-65', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-66" class="py-name"><a title="pyprocessing.lights'.GL_POSITION" class="py-name" href="#" onclick="return doclink('link-66', 'GL_POSITION', 'link-34');">GL_POSITION</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt id="link-67" class="py-name" targets="Variable pyprocessing.globs.mouse.x=pyprocessing.globs.mouse-class.html#x,Variable pyprocessing.globs.pmouse.x=pyprocessing.globs.pmouse-class.html#x,Variable pyprocessing.pvector.PVector.x=pyprocessing.pvector.PVector-class.html#x"><a title="pyprocessing.globs.mouse.x
pyprocessing.globs.pmouse.x
pyprocessing.pvector.PVector.x" class="py-name" href="#" onclick="return doclink('link-67', 'x', 'link-67');">x</a></tt><tt class="py-op">,</tt><tt id="link-68" class="py-name" targets="Variable pyprocessing.globs.mouse.y=pyprocessing.globs.mouse-class.html#y,Variable pyprocessing.globs.pmouse.y=pyprocessing.globs.pmouse-class.html#y,Variable pyprocessing.pvector.PVector.y=pyprocessing.pvector.PVector-class.html#y"><a title="pyprocessing.globs.mouse.y
pyprocessing.globs.pmouse.y
pyprocessing.pvector.PVector.y" class="py-name" href="#" onclick="return doclink('link-68', 'y', 'link-68');">y</a></tt><tt class="py-op">,</tt><tt id="link-69" class="py-name" targets="Variable pyprocessing.pvector.PVector.z=pyprocessing.pvector.PVector-class.html#z"><a title="pyprocessing.pvector.PVector.z" class="py-name" href="#" onclick="return doclink('link-69', 'z', 'link-69');">z</a></tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">    <tt id="link-70" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-70', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-71" class="py-name"><a title="pyprocessing.lights'.GL_SPOT_DIRECTION" class="py-name" href="#" onclick="return doclink('link-71', 'GL_SPOT_DIRECTION', 'link-36');">GL_SPOT_DIRECTION</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">    <tt id="link-72" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-72', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-73" class="py-name"><a title="pyprocessing.lights'.GL_SPOT_EXPONENT" class="py-name" href="#" onclick="return doclink('link-73', 'GL_SPOT_EXPONENT', 'link-38');">GL_SPOT_EXPONENT</a></tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">    <tt id="link-74" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-74', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-75" class="py-name"><a title="pyprocessing.lights'.GL_SPOT_CUTOFF" class="py-name" href="#" onclick="return doclink('link-75', 'GL_SPOT_CUTOFF', 'link-40');">GL_SPOT_CUTOFF</a></tt><tt class="py-op">,</tt> <tt class="py-number">180</tt><tt class="py-op">)</tt> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">    <tt class="py-name">constant</tt><tt class="py-op">,</tt> <tt class="py-name">linear</tt><tt class="py-op">,</tt> <tt class="py-name">quadratic</tt> <tt class="py-op">=</tt> <tt id="link-76" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-76', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-77" class="py-name" targets="Variable pyprocessing.globs.attrib.lightFalloff=pyprocessing.globs.attrib-class.html#lightFalloff,Function pyprocessing.lights'.lightFalloff()=pyprocessing.lights%27-module.html#lightFalloff"><a title="pyprocessing.globs.attrib.lightFalloff
pyprocessing.lights'.lightFalloff" class="py-name" href="#" onclick="return doclink('link-77', 'lightFalloff', 'link-77');">lightFalloff</a></tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">    <tt id="link-78" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-78', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-79" class="py-name"><a title="pyprocessing.lights'.GL_LINEAR_ATTENUATION" class="py-name" href="#" onclick="return doclink('link-79', 'GL_LINEAR_ATTENUATION', 'link-42');">GL_LINEAR_ATTENUATION</a></tt><tt class="py-op">,</tt> <tt class="py-name">linear</tt><tt class="py-op">)</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">    <tt id="link-80" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-80', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-81" class="py-name"><a title="pyprocessing.lights'.GL_QUADRATIC_ATTENUATION" class="py-name" href="#" onclick="return doclink('link-81', 'GL_QUADRATIC_ATTENUATION', 'link-44');">GL_QUADRATIC_ATTENUATION</a></tt><tt class="py-op">,</tt> <tt class="py-name">quadratic</tt><tt class="py-op">)</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">    <tt id="link-82" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-82', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-83" class="py-name"><a title="pyprocessing.lights'.GL_CONSTANT_ATTENUATION" class="py-name" href="#" onclick="return doclink('link-83', 'GL_CONSTANT_ATTENUATION', 'link-46');">GL_CONSTANT_ATTENUATION</a></tt><tt class="py-op">,</tt> <tt class="py-name">constant</tt><tt class="py-op">)</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">    <tt id="link-84" class="py-name"><a title="pyprocessing.lights'.glEnable" class="py-name" href="#" onclick="return doclink('link-84', 'glEnable', 'link-6');">glEnable</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">)</tt> </tt>
</div><a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"> </tt>
<a name="ambientLight"></a><div id="ambientLight-def"><a name="L60"></a><tt class="py-lineno"> 60</tt> <a class="py-toggle" href="#" id="ambientLight-toggle" onclick="return toggle('ambientLight');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.lights'-module.html#ambientLight">ambientLight</a><tt class="py-op">(</tt><tt class="py-param">v1</tt><tt class="py-op">,</tt><tt class="py-param">v2</tt><tt class="py-op">,</tt><tt class="py-param">v3</tt><tt class="py-op">,</tt><tt class="py-param">x</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-param">y</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-param">z</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ambientLight-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ambientLight-expanded"><a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">    <tt class="py-docstring">"""Adds an ambient light."""</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">    <tt id="link-85" class="py-name"><a title="pyprocessing.lights'._lightsOn" class="py-name" href="#" onclick="return doclink('link-85', '_lightsOn', 'link-16');">_lightsOn</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">    <tt id="link-86" class="py-name"><a title="pyprocessing.colors.color" class="py-name" href="#" onclick="return doclink('link-86', 'color', 'link-17');">color</a></tt> <tt class="py-op">=</tt> <tt id="link-87" class="py-name"><a title="pyprocessing.colors._getColor" class="py-name" href="#" onclick="return doclink('link-87', '_getColor', 'link-3');">_getColor</a></tt><tt class="py-op">(</tt><tt class="py-name">v1</tt><tt class="py-op">,</tt><tt class="py-name">v2</tt><tt class="py-op">,</tt><tt class="py-name">v3</tt><tt class="py-op">)</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">    <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt id="link-88" class="py-name"><a title="pyprocessing.lights'.GL_LIGHT0" class="py-name" href="#" onclick="return doclink('link-88', 'GL_LIGHT0', 'link-13');">GL_LIGHT0</a></tt> <tt class="py-op">+</tt> <tt id="link-89" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-89', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-90" class="py-name"><a title="pyprocessing.globs.attrib.lightCount" class="py-name" href="#" onclick="return doclink('link-90', 'lightCount', 'link-11');">lightCount</a></tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">    <tt id="link-91" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-91', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-92" class="py-name"><a title="pyprocessing.globs.attrib.lightCount" class="py-name" href="#" onclick="return doclink('link-92', 'lightCount', 'link-11');">lightCount</a></tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">    <tt id="link-93" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-93', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-94" class="py-name"><a title="pyprocessing.lights'.GL_DIFFUSE" class="py-name" href="#" onclick="return doclink('link-94', 'GL_DIFFUSE', 'link-25');">GL_DIFFUSE</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">    <tt id="link-95" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-95', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-96" class="py-name"><a title="pyprocessing.lights'.GL_AMBIENT" class="py-name" href="#" onclick="return doclink('link-96', 'GL_AMBIENT', 'link-28');">GL_AMBIENT</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt id="link-97" class="py-name"><a title="pyprocessing.colors.color" class="py-name" href="#" onclick="return doclink('link-97', 'color', 'link-17');">color</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">    <tt id="link-98" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-98', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-99" class="py-name"><a title="pyprocessing.lights'.GL_SPECULAR" class="py-name" href="#" onclick="return doclink('link-99', 'GL_SPECULAR', 'link-30');">GL_SPECULAR</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">    <tt id="link-100" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-100', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-101" class="py-name"><a title="pyprocessing.lights'.GL_POSITION" class="py-name" href="#" onclick="return doclink('link-101', 'GL_POSITION', 'link-34');">GL_POSITION</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt id="link-102" class="py-name"><a title="pyprocessing.globs.mouse.x
pyprocessing.globs.pmouse.x
pyprocessing.pvector.PVector.x" class="py-name" href="#" onclick="return doclink('link-102', 'x', 'link-67');">x</a></tt><tt class="py-op">,</tt><tt id="link-103" class="py-name"><a title="pyprocessing.globs.mouse.y
pyprocessing.globs.pmouse.y
pyprocessing.pvector.PVector.y" class="py-name" href="#" onclick="return doclink('link-103', 'y', 'link-68');">y</a></tt><tt class="py-op">,</tt><tt id="link-104" class="py-name"><a title="pyprocessing.pvector.PVector.z" class="py-name" href="#" onclick="return doclink('link-104', 'z', 'link-69');">z</a></tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">    <tt class="py-name">constant</tt><tt class="py-op">,</tt> <tt class="py-name">linear</tt><tt class="py-op">,</tt> <tt class="py-name">quadratic</tt> <tt class="py-op">=</tt> <tt id="link-105" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-105', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-106" class="py-name"><a title="pyprocessing.globs.attrib.lightFalloff
pyprocessing.lights'.lightFalloff" class="py-name" href="#" onclick="return doclink('link-106', 'lightFalloff', 'link-77');">lightFalloff</a></tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">    <tt id="link-107" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-107', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-108" class="py-name"><a title="pyprocessing.lights'.GL_LINEAR_ATTENUATION" class="py-name" href="#" onclick="return doclink('link-108', 'GL_LINEAR_ATTENUATION', 'link-42');">GL_LINEAR_ATTENUATION</a></tt><tt class="py-op">,</tt> <tt class="py-name">linear</tt><tt class="py-op">)</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">    <tt id="link-109" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-109', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-110" class="py-name"><a title="pyprocessing.lights'.GL_QUADRATIC_ATTENUATION" class="py-name" href="#" onclick="return doclink('link-110', 'GL_QUADRATIC_ATTENUATION', 'link-44');">GL_QUADRATIC_ATTENUATION</a></tt><tt class="py-op">,</tt> <tt class="py-name">quadratic</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">    <tt id="link-111" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-111', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-112" class="py-name"><a title="pyprocessing.lights'.GL_CONSTANT_ATTENUATION" class="py-name" href="#" onclick="return doclink('link-112', 'GL_CONSTANT_ATTENUATION', 'link-46');">GL_CONSTANT_ATTENUATION</a></tt><tt class="py-op">,</tt> <tt class="py-name">constant</tt><tt class="py-op">)</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">    <tt id="link-113" class="py-name"><a title="pyprocessing.lights'.glEnable" class="py-name" href="#" onclick="return doclink('link-113', 'glEnable', 'link-6');">glEnable</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">)</tt> </tt>
</div><a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line"> </tt>
<a name="spotLight"></a><div id="spotLight-def"><a name="L76"></a><tt class="py-lineno"> 76</tt> <a class="py-toggle" href="#" id="spotLight-toggle" onclick="return toggle('spotLight');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.lights'-module.html#spotLight">spotLight</a><tt class="py-op">(</tt><tt class="py-param">v1</tt><tt class="py-op">,</tt> <tt class="py-param">v2</tt><tt class="py-op">,</tt> <tt class="py-param">v3</tt><tt class="py-op">,</tt> <tt class="py-param">x</tt><tt class="py-op">,</tt> <tt class="py-param">y</tt><tt class="py-op">,</tt> <tt class="py-param">z</tt><tt class="py-op">,</tt> <tt class="py-param">nx</tt><tt class="py-op">,</tt> <tt class="py-param">ny</tt><tt class="py-op">,</tt> <tt class="py-param">nz</tt><tt class="py-op">,</tt> <tt class="py-param">angle</tt><tt class="py-op">,</tt> <tt class="py-param">concentration</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="spotLight-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="spotLight-expanded"><a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">    <tt class="py-docstring">"""Adds a spot light source."""</tt> </tt>
<a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">    <tt id="link-114" class="py-name"><a title="pyprocessing.lights'._lightsOn" class="py-name" href="#" onclick="return doclink('link-114', '_lightsOn', 'link-16');">_lightsOn</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line">    <tt id="link-115" class="py-name"><a title="pyprocessing.colors.color" class="py-name" href="#" onclick="return doclink('link-115', 'color', 'link-17');">color</a></tt> <tt class="py-op">=</tt> <tt id="link-116" class="py-name"><a title="pyprocessing.colors._getColor" class="py-name" href="#" onclick="return doclink('link-116', '_getColor', 'link-3');">_getColor</a></tt><tt class="py-op">(</tt><tt class="py-name">v1</tt><tt class="py-op">,</tt><tt class="py-name">v2</tt><tt class="py-op">,</tt><tt class="py-name">v3</tt><tt class="py-op">)</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">    <tt class="py-name">n</tt> <tt class="py-op">=</tt> <tt id="link-117" class="py-name"><a title="pyprocessing.lights'.GL_LIGHT0" class="py-name" href="#" onclick="return doclink('link-117', 'GL_LIGHT0', 'link-13');">GL_LIGHT0</a></tt> <tt class="py-op">+</tt> <tt id="link-118" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-118', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-119" class="py-name"><a title="pyprocessing.globs.attrib.lightCount" class="py-name" href="#" onclick="return doclink('link-119', 'lightCount', 'link-11');">lightCount</a></tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">    <tt id="link-120" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-120', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-121" class="py-name"><a title="pyprocessing.globs.attrib.lightCount" class="py-name" href="#" onclick="return doclink('link-121', 'lightCount', 'link-11');">lightCount</a></tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">    <tt id="link-122" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-122', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-123" class="py-name"><a title="pyprocessing.lights'.GL_DIFFUSE" class="py-name" href="#" onclick="return doclink('link-123', 'GL_DIFFUSE', 'link-25');">GL_DIFFUSE</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-op">*</tt><tt id="link-124" class="py-name"><a title="pyprocessing.colors.color" class="py-name" href="#" onclick="return doclink('link-124', 'color', 'link-17');">color</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">    <tt id="link-125" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-125', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-126" class="py-name"><a title="pyprocessing.lights'.GL_AMBIENT" class="py-name" href="#" onclick="return doclink('link-126', 'GL_AMBIENT', 'link-28');">GL_AMBIENT</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt>   </tt>
<a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">    <tt id="link-127" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-127', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-128" class="py-name"><a title="pyprocessing.lights'.GL_SPECULAR" class="py-name" href="#" onclick="return doclink('link-128', 'GL_SPECULAR', 'link-30');">GL_SPECULAR</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">    <tt id="link-129" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-129', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-130" class="py-name"><a title="pyprocessing.lights'.GL_POSITION" class="py-name" href="#" onclick="return doclink('link-130', 'GL_POSITION', 'link-34');">GL_POSITION</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt id="link-131" class="py-name"><a title="pyprocessing.globs.mouse.x
pyprocessing.globs.pmouse.x
pyprocessing.pvector.PVector.x" class="py-name" href="#" onclick="return doclink('link-131', 'x', 'link-67');">x</a></tt><tt class="py-op">,</tt><tt id="link-132" class="py-name"><a title="pyprocessing.globs.mouse.y
pyprocessing.globs.pmouse.y
pyprocessing.pvector.PVector.y" class="py-name" href="#" onclick="return doclink('link-132', 'y', 'link-68');">y</a></tt><tt class="py-op">,</tt><tt id="link-133" class="py-name"><a title="pyprocessing.pvector.PVector.z" class="py-name" href="#" onclick="return doclink('link-133', 'z', 'link-69');">z</a></tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">    <tt id="link-134" class="py-name"><a title="pyprocessing.lights'.glLightfv" class="py-name" href="#" onclick="return doclink('link-134', 'glLightfv', 'link-24');">glLightfv</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-135" class="py-name"><a title="pyprocessing.lights'.GL_SPOT_DIRECTION" class="py-name" href="#" onclick="return doclink('link-135', 'GL_SPOT_DIRECTION', 'link-36');">GL_SPOT_DIRECTION</a></tt><tt class="py-op">,</tt> <tt class="py-op">(</tt><tt class="py-name">ctypes</tt><tt class="py-op">.</tt><tt class="py-name">c_float</tt> <tt class="py-op">*</tt> <tt class="py-number">3</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-name">nx</tt><tt class="py-op">,</tt><tt class="py-name">ny</tt><tt class="py-op">,</tt><tt class="py-name">nz</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">    <tt id="link-136" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-136', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-137" class="py-name"><a title="pyprocessing.lights'.GL_SPOT_EXPONENT" class="py-name" href="#" onclick="return doclink('link-137', 'GL_SPOT_EXPONENT', 'link-38');">GL_SPOT_EXPONENT</a></tt><tt class="py-op">,</tt> <tt class="py-name">concentration</tt><tt class="py-op">)</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">    <tt id="link-138" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-138', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-139" class="py-name"><a title="pyprocessing.lights'.GL_SPOT_CUTOFF" class="py-name" href="#" onclick="return doclink('link-139', 'GL_SPOT_CUTOFF', 'link-40');">GL_SPOT_CUTOFF</a></tt><tt class="py-op">,</tt> <tt class="py-name">math</tt><tt class="py-op">.</tt><tt class="py-name">degrees</tt><tt class="py-op">(</tt><tt class="py-name">angle</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">    <tt class="py-name">constant</tt><tt class="py-op">,</tt> <tt class="py-name">linear</tt><tt class="py-op">,</tt> <tt class="py-name">quadratic</tt> <tt class="py-op">=</tt> <tt id="link-140" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-140', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-141" class="py-name"><a title="pyprocessing.globs.attrib.lightFalloff
pyprocessing.lights'.lightFalloff" class="py-name" href="#" onclick="return doclink('link-141', 'lightFalloff', 'link-77');">lightFalloff</a></tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">    <tt id="link-142" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-142', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-143" class="py-name"><a title="pyprocessing.lights'.GL_LINEAR_ATTENUATION" class="py-name" href="#" onclick="return doclink('link-143', 'GL_LINEAR_ATTENUATION', 'link-42');">GL_LINEAR_ATTENUATION</a></tt><tt class="py-op">,</tt> <tt class="py-name">linear</tt><tt class="py-op">)</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">    <tt id="link-144" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-144', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-145" class="py-name"><a title="pyprocessing.lights'.GL_QUADRATIC_ATTENUATION" class="py-name" href="#" onclick="return doclink('link-145', 'GL_QUADRATIC_ATTENUATION', 'link-44');">GL_QUADRATIC_ATTENUATION</a></tt><tt class="py-op">,</tt> <tt class="py-name">quadratic</tt><tt class="py-op">)</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">    <tt id="link-146" class="py-name"><a title="pyprocessing.lights'.glLightf" class="py-name" href="#" onclick="return doclink('link-146', 'glLightf', 'link-37');">glLightf</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">,</tt> <tt id="link-147" class="py-name"><a title="pyprocessing.lights'.GL_CONSTANT_ATTENUATION" class="py-name" href="#" onclick="return doclink('link-147', 'GL_CONSTANT_ATTENUATION', 'link-46');">GL_CONSTANT_ATTENUATION</a></tt><tt class="py-op">,</tt> <tt class="py-name">constant</tt><tt class="py-op">)</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">    <tt id="link-148" class="py-name"><a title="pyprocessing.lights'.glEnable" class="py-name" href="#" onclick="return doclink('link-148', 'glEnable', 'link-6');">glEnable</a></tt><tt class="py-op">(</tt><tt class="py-name">n</tt><tt class="py-op">)</tt> </tt>
</div><a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line"> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line"> </tt>
<a name="lightSpecular"></a><div id="lightSpecular-def"><a name="L96"></a><tt class="py-lineno"> 96</tt> <a class="py-toggle" href="#" id="lightSpecular-toggle" onclick="return toggle('lightSpecular');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.lights'-module.html#lightSpecular">lightSpecular</a> <tt class="py-op">(</tt><tt class="py-param">v1</tt><tt class="py-op">,</tt><tt class="py-param">v2</tt><tt class="py-op">,</tt><tt class="py-param">v3</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lightSpecular-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="lightSpecular-expanded"><a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">    <tt class="py-docstring">"""Sets the specular coefficients for light sources defined afterwards."""</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">    <tt id="link-149" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-149', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-150" class="py-name"><a title="pyprocessing.globs.attrib.lightSpecular
pyprocessing.lights'.lightSpecular" class="py-name" href="#" onclick="return doclink('link-150', 'lightSpecular', 'link-32');">lightSpecular</a></tt> <tt class="py-op">=</tt> <tt id="link-151" class="py-name"><a title="pyprocessing.colors._getColor" class="py-name" href="#" onclick="return doclink('link-151', '_getColor', 'link-3');">_getColor</a></tt><tt class="py-op">(</tt><tt class="py-name">v1</tt><tt class="py-op">,</tt><tt class="py-name">v2</tt><tt class="py-op">,</tt><tt class="py-name">v3</tt><tt class="py-op">)</tt> </tt>
</div><a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"> </tt>
<a name="lightFalloff"></a><div id="lightFalloff-def"><a name="L100"></a><tt class="py-lineno">100</tt> <a class="py-toggle" href="#" id="lightFalloff-toggle" onclick="return toggle('lightFalloff');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.lights'-module.html#lightFalloff">lightFalloff</a><tt class="py-op">(</tt><tt class="py-param">constant</tt><tt class="py-op">,</tt> <tt class="py-param">linear</tt><tt class="py-op">,</tt> <tt class="py-param">quadratic</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lightFalloff-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="lightFalloff-expanded"><a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">    <tt class="py-docstring">"""Sets the attenuation coefficients for light sources defined afterwards."""</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">    <tt id="link-152" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-152', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-153" class="py-name"><a title="pyprocessing.globs.attrib.lightFalloff
pyprocessing.lights'.lightFalloff" class="py-name" href="#" onclick="return doclink('link-153', 'lightFalloff', 'link-77');">lightFalloff</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">constant</tt><tt class="py-op">,</tt> <tt class="py-name">linear</tt><tt class="py-op">,</tt> <tt class="py-name">quadratic</tt><tt class="py-op">)</tt> </tt>
</div><a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">     </tt>
<a name="lights"></a><div id="lights-def"><a name="L104"></a><tt class="py-lineno">104</tt> <a class="py-toggle" href="#" id="lights-toggle" onclick="return toggle('lights');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.lights'-module.html#lights">lights</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="lights-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="lights-expanded"><a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">    <tt class="py-docstring">"""Turns on the illumination model."""</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">    <tt id="link-154" class="py-name"><a title="pyprocessing.lights'._lightsOn" class="py-name" href="#" onclick="return doclink('link-154', '_lightsOn', 'link-16');">_lightsOn</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line">    <tt id="link-155" class="py-name"><a title="pyprocessing.globs.attrib.lightSpecular
pyprocessing.lights'.lightSpecular" class="py-name" href="#" onclick="return doclink('link-155', 'lightSpecular', 'link-32');">lightSpecular</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">    <tt id="link-156" class="py-name" targets="Function pyprocessing.lights'.directionalLight()=pyprocessing.lights%27-module.html#directionalLight"><a title="pyprocessing.lights'.directionalLight" class="py-name" href="#" onclick="return doclink('link-156', 'directionalLight', 'link-156');">directionalLight</a></tt><tt class="py-op">(</tt><tt class="py-number">128</tt><tt class="py-op">,</tt> <tt class="py-number">128</tt><tt class="py-op">,</tt> <tt class="py-number">128</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">    <tt id="link-157" class="py-name" targets="Function pyprocessing.lights'.ambientLight()=pyprocessing.lights%27-module.html#ambientLight"><a title="pyprocessing.lights'.ambientLight" class="py-name" href="#" onclick="return doclink('link-157', 'ambientLight', 'link-157');">ambientLight</a></tt><tt class="py-op">(</tt><tt class="py-number">128</tt><tt class="py-op">,</tt> <tt class="py-number">128</tt><tt class="py-op">,</tt> <tt class="py-number">128</tt><tt class="py-op">)</tt> </tt>
</div><a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">     </tt>
<a name="noLights"></a><div id="noLights-def"><a name="L111"></a><tt class="py-lineno">111</tt> <a class="py-toggle" href="#" id="noLights-toggle" onclick="return toggle('noLights');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.lights'-module.html#noLights">noLights</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="noLights-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="noLights-expanded"><a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">    <tt class="py-docstring">"""Turns off the illumination model."""</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">    <tt id="link-158" class="py-name"><a title="pyprocessing.lights'.glDisable" class="py-name" href="#" onclick="return doclink('link-158', 'glDisable', 'link-12');">glDisable</a></tt><tt class="py-op">(</tt><tt id="link-159" class="py-name"><a title="pyprocessing.lights'.GL_LIGHTING" class="py-name" href="#" onclick="return doclink('link-159', 'GL_LIGHTING', 'link-7');">GL_LIGHTING</a></tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">    <tt class="py-keyword">for</tt> <tt class="py-name">i</tt> <tt class="py-keyword">in</tt> <tt class="py-name">range</tt><tt class="py-op">(</tt><tt id="link-160" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-160', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-161" class="py-name"><a title="pyprocessing.globs.attrib.lightCount" class="py-name" href="#" onclick="return doclink('link-161', 'lightCount', 'link-11');">lightCount</a></tt><tt class="py-op">)</tt><tt class="py-op">:</tt> <tt id="link-162" class="py-name"><a title="pyprocessing.lights'.glDisable" class="py-name" href="#" onclick="return doclink('link-162', 'glDisable', 'link-12');">glDisable</a></tt> <tt class="py-op">(</tt><tt id="link-163" class="py-name"><a title="pyprocessing.lights'.GL_LIGHT0" class="py-name" href="#" onclick="return doclink('link-163', 'GL_LIGHT0', 'link-13');">GL_LIGHT0</a></tt><tt class="py-op">+</tt><tt class="py-name">i</tt><tt class="py-op">)</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">    <tt id="link-164" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-164', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-165" class="py-name"><a title="pyprocessing.globs.attrib.lights
pyprocessing.lights'.lights" class="py-name" href="#" onclick="return doclink('link-165', 'lights', 'link-5');">lights</a></tt> <tt class="py-op">=</tt> <tt class="py-name">False</tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">    <tt id="link-166" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-166', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-167" class="py-name"><a title="pyprocessing.globs.attrib.lightCount" class="py-name" href="#" onclick="return doclink('link-167', 'lightCount', 'link-11');">lightCount</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">    <tt id="link-168" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-168', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-169" class="py-name"><a title="pyprocessing.globs.attrib.lightFalloff
pyprocessing.lights'.lightFalloff" class="py-name" href="#" onclick="return doclink('link-169', 'lightFalloff', 'link-77');">lightFalloff</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">    <tt id="link-170" class="py-name"><a title="pyprocessing.globs.attrib" class="py-name" href="#" onclick="return doclink('link-170', 'attrib', 'link-4');">attrib</a></tt><tt class="py-op">.</tt><tt id="link-171" class="py-name"><a title="pyprocessing.globs.attrib.lightSpecular
pyprocessing.lights'.lightSpecular" class="py-name" href="#" onclick="return doclink('link-171', 'lightSpecular', 'link-32');">lightSpecular</a></tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">1</tt><tt class="py-op">)</tt> </tt>
</div><a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pyprocessing-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Mon Jun 11 22:06:47 2012
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
